package com.kmxd.ams.app.convert.impl;

import com.kmxd.ams.app.convert.AbstractDocConvert;
import java.util.Arrays;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * pdf转换工具类
 *
 * @author ZuoLG
 */
@Service("aspose")
@Slf4j
public class PdfService implements AbstractDocConvert {
  private static final String LICENSE =
          "<License><Data><Products><Product>Aspose.Total for Java</Product><Product>Aspose.Words for Java</Product></Products><EditionType>Enterprise</EditionType><SubscriptionExpiry>20991231</SubscriptionExpiry><LicenseExpiry>20991231</LicenseExpiry><SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber></Data><Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature></License>";

  private List<String> word = Arrays.asList("xls", "xlsx", "et", "xlsm");
  private List<String> excel = Arrays.asList("xls", "xlsx", "et", "xlsm");
  private List<String> ppt = Arrays.asList("ppt", "pptx");
  private List<String> pdf = Arrays.asList("pdf");
  private List<String> img =
          Arrays.asList("bmp", "jpg", "png", "tif", "gif", "svg", "webp", "apng");
  private List<String> html = Arrays.asList("html", "htm", "mht", "mhtml");
  private List<String> tiff = Arrays.asList("tif", "tiff");

  public static final String TYPE_UNSUPPORT = "不支持的格式";
  public static final String TYPE_WORD = "TYPE_WORD";
  public static final String TYPE_EXCEL = "TYPE_EXCEL";
  public static final String TYPE_PPT = "TYPE_PPT";
  public static final String TYPE_PDF = "TYPE_PDF";
  public static final String TYPE_IMG = "TYPE_IMG";
  public static final String TYPE_HTML = "TYPE_HTML";
  public static final String TYPE_TIFF = "TYPE_TIFF";

  @Override
  public void setFileType(List<String> strs, String fileType) {

  }

  @Override
  public void docConvert(String srcPath, String pdfPath) throws Exception {

  }

  @Override
  public int getFilePages(String srcPath) {
    return 0;
  }
}
